﻿@model LessonModel
@{
    int p = 0;

    if (@Model.TotalLessonCount == 0)
    {
        p = 0;
    }
    else
    {
        p = @Model.CurrentLesson / @Model.TotalLessonCount;
    }


    int ph = p * 100;

    string status = "";

    if (Model.LessonStatus == 0)
    {
        status = "未开始";
    }
    else if (Model.LessonStatus == 1)
    {
        status = "上课中";
    }
    else
    {
        status = "已结束";
    }
}

<h4 class="mb-3 font-weight-bold coursename">@Model.CourseTitle<span class="chaptersection">@Model.ChapterSection</span></h4>
<p class="title">课时主题: @Model.LessonTitle</p>
<p class="starttime">开始时间: @Model.BeginTime.ToString("yyyy-MM-dd HH:mm")</p>
<p class="teacher">授课教师: @Model.TeacherName</p>
<p class="status1">课时状态:<span id="statustxt">@status</span> </p>
<input type="hidden" value="@Model.MeetingNo" id="meetingno"/>
<hr>
<!-- Progress-->
<p class="">课程进度: <span class="float-right">@Model.CurrentLesson/@Model.TotalLessonCount</span></p>
<div class="progress mb-1" style="height: 7px;">
    <div class="progress-bar"
         role="progressbar" aria-valuenow="@p" aria-valuemin="0" aria-valuemax="100"
         style="width: @ph%;">
    </div><!-- /.progress-bar .progress-bar-danger -->
</div><!-- /.progress .no-rounded -->
<hr>
<script>
    $(function () {

  



    });
</script>